package com.ray.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.ray.bean.CompanyMaterialTableBean;
import com.ray.bean.OrderInfoDetailBean;
import com.ray.bean.WarehouseInOutDetailBean;

public interface ReturnWarehouseToProviderMapper {
	
	List<CompanyMaterialTableBean> getMaterialCanReturnToProviderData(Map<String, Object> map);
	int getMaterialCanReturnToProviderCount(Map<String, Object> map);
	
	double getCanProductToProviderCount(Map<String,String> map);
	
	double getNotApprovalToProviderCount(Map<String, String> paramMap);
	
	Double getReturnMaterialOutCountProvderByPurchase(Map<String, String> paramMap);
	
	Double getReturnMaterialInCountByPurchase(Map<String, String> paramMap);
	
	List<CompanyMaterialTableBean> getCanInCountByReturnToProviderData(Map<String, Object> map);
	int getCanInCountByReturnToProviderCount(Map<String, Object> map);
	
	List<WarehouseInOutDetailBean> getInCountByReturnToProvderData(Map<String, Object> map);
	int getInCountByReturnToProvderCount(Map<String, Object> map);
	
	Double getAllReturnToProviderCount(WarehouseInOutDetailBean wiodb);
	
	Double getAllReturnInCount(WarehouseInOutDetailBean wiodb);
	
	List<WarehouseInOutDetailBean> getWorkShopToWarehouseData(Map<String, Object> map);
	int getWorkShopToWarehouseCount(Map<String, Object> map);
	
	List<WarehouseInOutDetailBean> getWorkShopToWorkShopData(Map<String, Object> map);
	int getWorkShopToWorkShopCount(Map<String, Object> map);
	
	Double getAllReturnToWarehouseCount(WarehouseInOutDetailBean wiodb);
	
	Double getAllReturnOutCount(WarehouseInOutDetailBean wiodb);
	
	OrderInfoDetailBean getOrderDetailByDetail(@Param("orderId")String orderId, @Param("rowIndex")String rowIndex, @Param("materialType")String materialType);
	
	Double getCanOutToWorkShopCount(Map map);
	//将采购单修改为退货入库单删除状态
	int updatePurchaseIsDelete(@Param("idList")List<String> idList);
	
	/**
	 * 通过关联id获取
	 * @param id
	 * @param type  
	 * @return
	 */
	Double getNotApprovalReturnTopProviderCountByOtherId(@Param("otherId")String id,@Param("type") int type );
	

	
}
 